<template>
  <div>
    <van-nav-bar title="消息中心" left-arrow @click-left="backmessage" />

    <van-cell-group>
      <van-cell :title="Detail.type == 1 ? '系统消息': '个人消息'" :value="Detail.createTime" :label="'发布人：' + Detail.sourceName" />
     <span class="msgdate">{{Detail.msgDate}}</span>

    </van-cell-group>
  </div>
</template>

<script>
import { messageDetal } from "../request/api";
export default {
  data() {
    return {
      Detail: [],
    };
  },
  created() {
    // console.log(this.$route.query.item.id);
    messageDetal({
      id: this.$route.query.item.id,
    }).then((res) => {
    //   console.log(res);
      this.Detail = res.data;
    });
  },
  methods: {
    backmessage() {
      this.$router.push('/messageCenter');
    },
  },
};
</script>
 
<style lang = "less" scoped>
/deep/.van-nav-bar {
  background-color: #003399;

  .van-nav-bar__title,
  .van-icon-arrow-left::before {
    color: #fff;
  }
}
.msgdate{
    display: block;
    color:#666;
   line-height: 30px;
   padding: 20px;
   font-size: 14px;
  
}
</style>